﻿using AutoMapper;
using Smart.Admin.Domain.Model.Entity;
using Smart.Admin.Domain.Model.Response.HelpDoc;
using Smart.Admin.Domain.Model.Response.HelpDocCatalog;
using Smart.Admin.Domain.Model.Response.Notice;
using Smart.Admin.Domain.Model.Response.Store;

namespace Smart.Admin.Api.AutoMappConfig
{
    public class MappingProfile : Profile
    {
        public MappingProfile()
        {
             CreateMap<StoreEntity, GetStoreResponse>()
            .ForMember(dest => dest.StoreId, opt => opt.MapFrom(src => src.Id)).ReverseMap();

             CreateMap<NoticeEntity, GetNoticeResponse>()
            .ForMember(dest => dest.NoticeId, opt => opt.MapFrom(src => src.Id)).ReverseMap();


            CreateMap<HelpDocCatalogEntity, GetHelpDocCatalogResponse>()
            .ForMember(dest => dest.HelpDocCatalogId, opt => opt.MapFrom(src => src.Id)).ReverseMap();

            CreateMap<HelpDocEntity, GetHelpDocResponse>()
            .ForMember(dest => dest.HelpDocId, opt => opt.MapFrom(src => src.Id)).ReverseMap();
        }
    }
}
